package com.hang.gymmanager.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hang.gymmanager.entity.CourseEntity;
import com.hang.gymmanager.req.PageCourseReq;
import com.hang.gymmanager.res.CenterCoursePageRes;
import com.hang.gymmanager.res.PageCourseRes;
import com.hang.gymmanager.res.UserCoursePageRes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

@Component
@Mapper
public interface CourseMapper extends BaseMapper<CourseEntity> {

    Page<PageCourseRes> getPageCourse (@Param("req")PageCourseReq req,
                                       Page page);

    Page<CenterCoursePageRes> userCenterCourse(@Param("userId") Integer userId,
                                               Page page);

}
